import request from '@/utils/request'

export function listPaper(query){
  return request({
    url: '/exam/paper/list',
    method: 'get',
    params: query
  })
}

export function paperInfo(id){
  return request({
    url: '/exam/paper/info',
    method: 'get',
    params: { id : id }
  })
}

/**
 *
 * @param query
 * @returns {*}
 */
export function all(){
  return request({
    url: '/exam/paper/all',
    method: 'get',
  })
}
/**
 * @param query
 * @returns {*}
 */
export function insertQuestion(data){
  return request({
    url: '/exam/paper/insertQuestion',
    method: 'post',
    data: data
  })
}

export function removeQuestion(data){
  return request({
    url: '/exam/paper/removeQuestion',
    method: 'post',
    data: data
  })
}

export function addPaper(data){
  return request({
    url: '/exam/paper/add',
    method: 'post',
    data: data
  })
}
export function updatePaper(data){
  return request({
    url: '/exam/paper/update',
    method: 'post',
    data: data
  })
}

/**
 * @param query
 * @returns {*}
 */
export function del(id){
  return request({
    url: '/exam/paper/del',
    method: 'post',
    data: id
  })
}

